home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2232 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  3.0 KB

  1. Path: news.unt.edu!zaphod!srt
  2. From: srt@zaphod.csci.unt.edu (Steve Tate)
  3. Newsgroups: comp.edu,comp.lang.c,comp.lang.c++
  4. Subject: Re: C or C++ for a 14-year old?
  5. Followup-To: comp.edu,comp.lang.c,comp.lang.c++
  6. Date: 16 Jan 1996 17:04:05 GMT
  7. Organization: University of North Texas
  8. Distribution: world
  9. Message-ID: <4dglq5$ch8@hermes.acs.unt.edu>
  10. References: <4b30ld$lp2$1@mhafc.production.compuserve.com> <4d4jeh$fv1@wombat.melbpc.org.au> <w+PJjMD4ED1aLz3@dexam.another.gun.de> <4ddsg4$p4e@sundog.tiac.net> <4df9o9$qo0@usc.edu> <9601161206.AA29657@dxmint.cern.ch>
  11. NNTP-Posting-Host: zaphod.csci.unt.edu
  12. X-Newsreader: TIN [version 1.2 PL2]
  13.  
  14. Dan Pop (danpop@mail.cern.ch) wrote:
  15. > lerdsuwa@scf.usc.edu (Kriang Lerdsuwanakij) writes:
  16.  
  17. > >I would also recommend DOS.  At least the development tools are better and 
  18. > >easier to use,  better online help system.  You can write a program, 
  19. > >compile, run and debug right within the compiler.
  20.  
  21. > That is, unless the buggy program crashes your beloved "operating system"
  22. > or the bug has a chance to raise its ugly head (many bad pointer accesses
  23. > are detected only when the "debugged" code is ported to a platform with
  24. > memory protection).
  25.  
  26. That's actually the best comment that I've seen in this thread.  Last
  27. semester I taught data structures, which involves programs with lots
  28. of pointer manipulation.  Wanting them to concentrate on data
  29. structures rather than learning a new language/platform, I was very
  30. flexible about what language/platform they did their assignments on.
  31. Most students chose to use C on a PC running DOS.  However, I tested
  32. them all on my UNIX workstation.  An absolutely amazing number of
  33. programs that "worked" on a PC didn't work under UNIX.  Why?  There
  34. were pointer problems in their programs that DOS simply wasn't
  35. catching...
  36.  
  37. Following an unitialized pointer and reading memory in DOS?  No
  38. problem!  Writing to the same more-or-less-random memory location in
  39. DOS?  No problem!   Aaaargh...
  40.  
  41. So programs that had quite severe errors in them looked ok in DOS.
  42. That's very, very bad especially if you're talking about someone
  43. trying to learn to program --- they should catch every error possible
  44. and learn how to correct it.
  45.  
  46. I learned my lesson.  Next time I will require everyone to develop
  47. their programs under UNIX, and am trying to figure out if "bcc" lives
  48. up to its claims (it's a "bounds checking C compiler" which is really
  49. a hacked gcc --- it's supposed to be able to check array bounds,
  50. pointer references, and things like that.  Slows down "production
  51. code", but fantastic as a teaching/learning tool....).  Emacs+bcc+ddd
  52. (ddd is a nice graphical front end to gdb) -- sounds like a winning
  53. environment to me, and one that I personally would much prefer to
  54. anything available under DOS....
  55.  
  56. --
  57. Steve Tate  ---  srt@cs.unt.edu | "As often as a study is cultivated by narrow
  58. Dept. of Computer Sciences      |  minds, they will draw from it narrow
  59. University of North Texas       |  conclusions."  -- John Stuart Mill, 1865.
  60. Denton, TX  76201               | 
  61.